<%@ page import="imobiliaria2.Usuario" %>



			<div class="${hasErrors(bean: usuarioInstance, field: 'nome', 'error')} required">
				<label for="nome" class="control-label"><g:message code="usuario.nome.label" default="Nome" /><span class="required-indicator">*</span></label>
				<div>
					<g:textField class="form-control" name="nome" required="" value="${usuarioInstance?.nome}"/>
					<span class="help-inline">${hasErrors(bean: usuarioInstance, field: 'nome', 'error')}</span>
				</div>
			</div>

			<div class="${hasErrors(bean: usuarioInstance, field: 'senha', 'error')} required">
				<label for="senha" class="control-label"><g:message code="usuario.senha.label" default="Senha" /><span class="required-indicator">*</span></label>
				<div>
					<g:field class="form-control" type="password" name="senha" maxlength="15" required="" value="${usuarioInstance?.senha}"/>
					<span class="help-inline">${hasErrors(bean: usuarioInstance, field: 'senha', 'error')}</span>
				</div>
			</div>

			<div class="${hasErrors(bean: usuarioInstance, field: 'email', 'error')} required">
				<label for="email" class="control-label"><g:message code="usuario.email.label" default="Email" /><span class="required-indicator">*</span></label>
				<div>
					<g:field class="form-control" type="email" name="email" required="" value="${usuarioInstance?.email}"/>
					<span class="help-inline">${hasErrors(bean: usuarioInstance, field: 'email', 'error')}</span>
				</div>
			</div>

			<div class="${hasErrors(bean: usuarioInstance, field: 'endereco', 'error')} required">
				<label for="endereco" class="control-label"><g:message code="usuario.endereco.label" default="Endereco" /><span class="required-indicator">*</span></label>
				<div>
					<g:textField class="form-control" name="endereco" required="" value="${usuarioInstance?.endereco}"/>
					<span class="help-inline">${hasErrors(bean: usuarioInstance, field: 'endereco', 'error')}</span>
				</div>
			</div>

			<div class="${hasErrors(bean: usuarioInstance, field: 'sexo', 'error')} ">
				<label for="sexo" class="control-label"><g:message code="usuario.sexo.label" default="Sexo" /></label>
				<div>
					<g:select class="form-control" name="sexo" from="${usuarioInstance.constraints.sexo.inList}" value="${usuarioInstance?.sexo}" valueMessagePrefix="usuario.sexo" noSelection="['Indefinido': 'Escolha Seu Sexo']"/>
					<span class="help-inline">${hasErrors(bean: usuarioInstance, field: 'sexo', 'error')}</span>
				</div>
			</div>

			<div class="${hasErrors(bean: usuarioInstance, field: 'favoritos', 'error')} ">
				<label for="favoritos" class="control-label"><g:message code="usuario.favoritos.label" default="Favoritos" /></label>
				<div>
					
<ul class="one-to-many">
<g:each in="${usuarioInstance?.favoritos?}" var="f">
    <li><g:link controller="imovel" action="show" id="${f.id}">${f?.encodeAsHTML()}</g:link></li>
</g:each>
<li class="add">
<g:link controller="imovel" action="create" params="['usuario.id': usuarioInstance?.id]">${message(code: 'default.add.label', args: [message(code: 'imovel.label', default: 'Imovel')])}</g:link>
</li>
</ul>

					<span class="help-inline">${hasErrors(bean: usuarioInstance, field: 'favoritos', 'error')}</span>
				</div>
			</div>

